package com.huluobo.a2107monthdemo.category

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2107monthdemo.R
import com.huluobo.a2107monthdemo.utils.ImageUtil

/**
 *  Created by LC on 2023/12/4.
 */
class CategoryGoodsListAdapter(list: MutableList<CategoryGoodsListBean>) :
    BaseQuickAdapter<CategoryGoodsListBean, BaseViewHolder>(R.layout.item_category_goods_list, list) {
    override fun convert(helper: BaseViewHolder, item: CategoryGoodsListBean) {
        helper.setText(R.id.item_category_list_tv_desc, item.goods_desc)
        helper.setText(R.id.item_category_list_tv_price, "价格:￥${item.goods_default_price}元")
        ImageUtil.loadImage(context, item.goods_default_icon, helper.getView(R.id.item_category_list_iv))
    }
}